﻿namespace ActionLogic
{
    /// <summary>
    /// Describes executor of all actions during working QSM.
    /// </summary>
    public interface IActionExecutor
    {
        /// <summary>
        /// Action executor state.
        /// </summary>
        ActionExecutorState ActionExecutorState { get; } 

        /// <summary>
        /// Adds new action for executing.
        /// </summary>
        void Add(PriorityAction priorityAction);

        /// <summary>
        /// Starts action executing.
        /// </summary>
        void Start();

        /// <summary>
        /// Stops action executing.
        /// </summary>
        void Stop();

        /// <summary>
        /// Pause action executing.
        /// </summary>
        void Pause();

        /// <summary>
        /// Define wether executor has tasks for executing.
        /// </summary>
        /// <returns>True if executor has tasks for executing, else in other case</returns>
        bool IsEmpty();
    }
}
